﻿namespace DomainServices.Tools
{
    using System;
    using System.CodeDom;
    using System.Linq;

    internal class CodeDomVisitor
    {
        public void Visit(CodeCompileUnit codeCompileUnit)
        {
            if (codeCompileUnit == null)
            {
                throw new ArgumentNullException("codeCompileUnit");
            }
            this.VisitBase(codeCompileUnit);
        }

        protected virtual void VisitBase(CodeCompileUnit codeCompileUnit)
        {
            CodeSnippetCompileUnit codeSnippetCompileUnit = codeCompileUnit as CodeSnippetCompileUnit;
            if (codeSnippetCompileUnit != null)
            {
                this.VisitCodeSnippetCompileUnit(codeSnippetCompileUnit);
            }
            this.VisitCodeNamespaceCollection(codeCompileUnit.Namespaces);
            this.VisitCodeAttributeDeclarationCollection(codeCompileUnit.AssemblyCustomAttributes);
            this.VisitCodeDirectiveCollection(codeCompileUnit.StartDirectives);
            this.VisitCodeDirectiveCollection(codeCompileUnit.EndDirectives);
        }

        protected virtual void VisitCodeArgumentReferenceExpression(CodeArgumentReferenceExpression codeArgumentReferenceExpression)
        {
        }

        protected virtual void VisitCodeArrayCreateExpression(CodeArrayCreateExpression codeArrayCreateExpression)
        {
            if (codeArrayCreateExpression != null)
            {
                this.VisitCodeTypeReference(codeArrayCreateExpression.CreateType);
                this.VisitCodeExpressionCollection(codeArrayCreateExpression.Initializers);
                this.VisitCodeExpression(codeArrayCreateExpression.SizeExpression);
            }
        }

        protected virtual void VisitCodeArrayIndexerExpression(CodeArrayIndexerExpression codeArrayIndexerExpression)
        {
            if (codeArrayIndexerExpression != null)
            {
                this.VisitCodeExpression(codeArrayIndexerExpression.TargetObject);
                this.VisitCodeExpressionCollection(codeArrayIndexerExpression.Indices);
            }
        }

        protected virtual void VisitCodeAssignStatement(CodeAssignStatement codeAssignStatement)
        {
            if (codeAssignStatement != null)
            {
                this.VisitCodeExpression(codeAssignStatement.Left);
                this.VisitCodeExpression(codeAssignStatement.Right);
                this.VisitCodeLinePragma(codeAssignStatement.LinePragma);
                this.VisitCodeDirectiveCollection(codeAssignStatement.StartDirectives);
                this.VisitCodeDirectiveCollection(codeAssignStatement.EndDirectives);
            }
        }

        protected virtual void VisitCodeAttachEventStatement(CodeAttachEventStatement codeAttachEventStatement)
        {
            if (codeAttachEventStatement != null)
            {
                this.VisitCodeEventReferenceExpression(codeAttachEventStatement.Event);
                this.VisitCodeExpression(codeAttachEventStatement.Listener);
                this.VisitCodeLinePragma(codeAttachEventStatement.LinePragma);
                this.VisitCodeDirectiveCollection(codeAttachEventStatement.StartDirectives);
                this.VisitCodeDirectiveCollection(codeAttachEventStatement.EndDirectives);
            }
        }

        protected virtual void VisitCodeAttributeArgument(CodeAttributeArgument codeAttributeArgument)
        {
            if (codeAttributeArgument != null)
            {
                this.VisitCodeExpression(codeAttributeArgument.Value);
            }
        }

        protected virtual void VisitCodeAttributeArgumentCollection(CodeAttributeArgumentCollection codeAttributeArgumentCollection)
        {
            foreach (CodeAttributeArgument argument in codeAttributeArgumentCollection.Cast<CodeAttributeArgument>())
            {
                this.VisitCodeAttributeArgument(argument);
            }
        }

        protected virtual void VisitCodeAttributeDeclaration(CodeAttributeDeclaration codeAttributeDeclaration)
        {
            if (codeAttributeDeclaration != null)
            {
                this.VisitCodeAttributeArgumentCollection(codeAttributeDeclaration.Arguments);
                this.VisitCodeTypeReference(codeAttributeDeclaration.AttributeType);
            }
        }

        protected virtual void VisitCodeAttributeDeclarationCollection(CodeAttributeDeclarationCollection codeAttributeDeclarationCollection)
        {
            foreach (CodeAttributeDeclaration declaration in codeAttributeDeclarationCollection.Cast<CodeAttributeDeclaration>())
            {
                this.VisitCodeAttributeDeclaration(declaration);
            }
        }

        protected virtual void VisitCodeBaseReferenceExpression(CodeBaseReferenceExpression codeBaseReferenceExpression)
        {
        }

        protected virtual void VisitCodeBinaryOperatorExpression(CodeBinaryOperatorExpression codeBinaryOperatorExpression)
        {
            if (codeBinaryOperatorExpression != null)
            {
                this.VisitCodeExpression(codeBinaryOperatorExpression.Right);
                this.VisitCodeExpression(codeBinaryOperatorExpression.Left);
            }
        }

        protected virtual void VisitCodeCastExpression(CodeCastExpression codeCastExpression)
        {
            if (codeCastExpression != null)
            {
                this.VisitCodeTypeReference(codeCastExpression.TargetType);
                this.VisitCodeExpression(codeCastExpression.Expression);
            }
        }

        protected virtual void VisitCodeCatchClause(CodeCatchClause codeCatchClause)
        {
            if (codeCatchClause != null)
            {
                this.VisitCodeTypeReference(codeCatchClause.CatchExceptionType);
                this.VisitCodeStatementCollection(codeCatchClause.Statements);
            }
        }

        protected virtual void VisitCodeCatchClauseCollection(CodeCatchClauseCollection codeCatchClauseCollection)
        {
        }

        protected virtual void VisitCodeChecksumPragma(CodeChecksumPragma codeChecksumPragma)
        {
        }

        protected virtual void VisitCodeComment(CodeComment codeComment)
        {
        }

        protected virtual void VisitCodeCommentStatement(CodeCommentStatement codeCommentStatement)
        {
            if (codeCommentStatement != null)
            {
                this.VisitCodeComment(codeCommentStatement.Comment);
                this.VisitCodeLinePragma(codeCommentStatement.LinePragma);
                this.VisitCodeDirectiveCollection(codeCommentStatement.StartDirectives);
                this.VisitCodeDirectiveCollection(codeCommentStatement.EndDirectives);
            }
        }

        protected virtual void VisitCodeCommentStatementCollection(CodeCommentStatementCollection codeCommentStatementCollection)
        {
            foreach (CodeCommentStatement statement in codeCommentStatementCollection.Cast<CodeCommentStatement>())
            {
                this.VisitCodeCommentStatement(statement);
            }
        }

        protected virtual void VisitCodeConditionStatement(CodeConditionStatement codeConditionStatement)
        {
            if (codeConditionStatement != null)
            {
                this.VisitCodeExpression(codeConditionStatement.Condition);
                this.VisitCodeStatementCollection(codeConditionStatement.TrueStatements);
                this.VisitCodeStatementCollection(codeConditionStatement.FalseStatements);
                this.VisitCodeLinePragma(codeConditionStatement.LinePragma);
                this.VisitCodeDirectiveCollection(codeConditionStatement.StartDirectives);
                this.VisitCodeDirectiveCollection(codeConditionStatement.EndDirectives);
            }
        }

        protected virtual void VisitCodeConstructor(CodeConstructor codeConstructor)
        {
            if (codeConstructor != null)
            {
                this.VisitCodeExpressionCollection(codeConstructor.BaseConstructorArgs);
                this.VisitCodeExpressionCollection(codeConstructor.ChainedConstructorArgs);
                this.VisitCodeTypeReference(codeConstructor.ReturnType);
                this.VisitCodeStatementCollection(codeConstructor.Statements);
                this.VisitCodeParameterDeclarationExpressionCollection(codeConstructor.Parameters);
                this.VisitCodeTypeReference(codeConstructor.PrivateImplementationType);
                this.VisitCodeTypeReferenceCollection(codeConstructor.ImplementationTypes);
                this.VisitCodeAttributeDeclarationCollection(codeConstructor.ReturnTypeCustomAttributes);
                this.VisitCodeTypeParameterCollection(codeConstructor.TypeParameters);
                this.VisitCodeAttributeDeclarationCollection(codeConstructor.CustomAttributes);
                this.VisitCodeLinePragma(codeConstructor.LinePragma);
                this.VisitCodeCommentStatementCollection(codeConstructor.Comments);
                this.VisitCodeDirectiveCollection(codeConstructor.StartDirectives);
                this.VisitCodeDirectiveCollection(codeConstructor.EndDirectives);
            }
        }

        protected virtual void VisitCodeDefaultValueExpression(CodeDefaultValueExpression codeDefaultValueExpression)
        {
            if (codeDefaultValueExpression != null)
            {
                this.VisitCodeTypeReference(codeDefaultValueExpression.Type);
            }
        }

        protected virtual void VisitCodeDelegateCreateExpression(CodeDelegateCreateExpression codeDelegateCreateExpression)
        {
            if (codeDelegateCreateExpression != null)
            {
                this.VisitCodeTypeReference(codeDelegateCreateExpression.DelegateType);
                this.VisitCodeExpression(codeDelegateCreateExpression.TargetObject);
            }
        }

        protected virtual void VisitCodeDelegateInvokeExpression(CodeDelegateInvokeExpression codeDelegateInvokeExpression)
        {
            if (codeDelegateInvokeExpression != null)
            {
                this.VisitCodeExpression(codeDelegateInvokeExpression.TargetObject);
                this.VisitCodeExpressionCollection(codeDelegateInvokeExpression.Parameters);
            }
        }

        protected virtual void VisitCodeDirectionExpression(CodeDirectionExpression codeDirectionExpression)
        {
            if (codeDirectionExpression != null)
            {
                this.VisitCodeExpression(codeDirectionExpression.Expression);
            }
        }

        protected virtual void VisitCodeDirective(CodeDirective codeDirective)
        {
            if (codeDirective != null)
            {
                CodeChecksumPragma codeChecksumPragma = codeDirective as CodeChecksumPragma;
                if (codeChecksumPragma != null)
                {
                    this.VisitCodeChecksumPragma(codeChecksumPragma);
                }
                else
                {
                    CodeRegionDirective codeRegionDirective = codeDirective as CodeRegionDirective;
                    if (codeRegionDirective != null)
                    {
                        this.VisitCodeRegionDirective(codeRegionDirective);
                    }
                }
            }
        }

        protected virtual void VisitCodeDirectiveCollection(CodeDirectiveCollection codeDirectiveCollection)
        {
            foreach (CodeDirective directive in codeDirectiveCollection.Cast<CodeDirective>())
            {
                this.VisitCodeDirective(directive);
            }
        }

        protected virtual void VisitCodeEntryPointMethod(CodeEntryPointMethod codeEntryPointMethod)
        {
            if (codeEntryPointMethod != null)
            {
                this.VisitCodeTypeReference(codeEntryPointMethod.ReturnType);
                this.VisitCodeStatementCollection(codeEntryPointMethod.Statements);
                this.VisitCodeParameterDeclarationExpressionCollection(codeEntryPointMethod.Parameters);
                this.VisitCodeTypeReference(codeEntryPointMethod.PrivateImplementationType);
                this.VisitCodeTypeReferenceCollection(codeEntryPointMethod.ImplementationTypes);
                this.VisitCodeAttributeDeclarationCollection(codeEntryPointMethod.ReturnTypeCustomAttributes);
                this.VisitCodeTypeParameterCollection(codeEntryPointMethod.TypeParameters);
                this.VisitCodeAttributeDeclarationCollection(codeEntryPointMethod.CustomAttributes);
                this.VisitCodeLinePragma(codeEntryPointMethod.LinePragma);
                this.VisitCodeCommentStatementCollection(codeEntryPointMethod.Comments);
                this.VisitCodeDirectiveCollection(codeEntryPointMethod.StartDirectives);
                this.VisitCodeDirectiveCollection(codeEntryPointMethod.EndDirectives);
            }
        }

        protected virtual void VisitCodeEventReferenceExpression(CodeEventReferenceExpression codeEventReferenceExpression)
        {
            if (codeEventReferenceExpression != null)
            {
                this.VisitCodeExpression(codeEventReferenceExpression.TargetObject);
            }
        }

        protected virtual void VisitCodeExpression(CodeExpression codeExpression)
        {
            if (codeExpression != null)
            {
                CodeArgumentReferenceExpression codeArgumentReferenceExpression = codeExpression as CodeArgumentReferenceExpression;
                if (codeArgumentReferenceExpression != null)
                {
                    this.VisitCodeArgumentReferenceExpression(codeArgumentReferenceExpression);
                }
                else
                {
                    CodeArrayCreateExpression codeArrayCreateExpression = codeExpression as CodeArrayCreateExpression;
                    if (codeArrayCreateExpression != null)
                    {
                        this.VisitCodeArrayCreateExpression(codeArrayCreateExpression);
                    }
                    else
                    {
                        CodeArrayIndexerExpression codeArrayIndexerExpression = codeExpression as CodeArrayIndexerExpression;
                        if (codeArrayIndexerExpression != null)
                        {
                            this.VisitCodeArrayIndexerExpression(codeArrayIndexerExpression);
                        }
                        else
                        {
                            CodeBaseReferenceExpression codeBaseReferenceExpression = codeExpression as CodeBaseReferenceExpression;
                            if (codeBaseReferenceExpression != null)
                            {
                                this.VisitCodeBaseReferenceExpression(codeBaseReferenceExpression);
                            }
                            else
                            {
                                CodeBinaryOperatorExpression codeBinaryOperatorExpression = codeExpression as CodeBinaryOperatorExpression;
                                if (codeBinaryOperatorExpression != null)
                                {
                                    this.VisitCodeBinaryOperatorExpression(codeBinaryOperatorExpression);
                                }
                                else
                                {
                                    CodeCastExpression codeCastExpression = codeExpression as CodeCastExpression;
                                    if (codeCastExpression != null)
                                    {
                                        this.VisitCodeCastExpression(codeCastExpression);
                                    }
                                    else
                                    {
                                        CodeDefaultValueExpression codeDefaultValueExpression = codeExpression as CodeDefaultValueExpression;
                                        if (codeDefaultValueExpression != null)
                                        {
                                            this.VisitCodeDefaultValueExpression(codeDefaultValueExpression);
                                        }
                                        else
                                        {
                                            CodeDelegateCreateExpression codeDelegateCreateExpression = codeExpression as CodeDelegateCreateExpression;
                                            if (codeDelegateCreateExpression != null)
                                            {
                                                this.VisitCodeDelegateCreateExpression(codeDelegateCreateExpression);
                                            }
                                            else
                                            {
                                                CodeDelegateInvokeExpression codeDelegateInvokeExpression = codeExpression as CodeDelegateInvokeExpression;
                                                if (codeDelegateInvokeExpression != null)
                                                {
                                                    this.VisitCodeDelegateInvokeExpression(codeDelegateInvokeExpression);
                                                }
                                                else
                                                {
                                                    CodeDirectionExpression codeDirectionExpression = codeExpression as CodeDirectionExpression;
                                                    if (codeDirectionExpression != null)
                                                    {
                                                        this.VisitCodeDirectionExpression(codeDirectionExpression);
                                                    }
                                                    else
                                                    {
                                                        CodeEventReferenceExpression codeEventReferenceExpression = codeExpression as CodeEventReferenceExpression;
                                                        if (codeEventReferenceExpression != null)
                                                        {
                                                            this.VisitCodeEventReferenceExpression(codeEventReferenceExpression);
                                                        }
                                                        else
                                                        {
                                                            CodeFieldReferenceExpression codeFieldReferenceExpression = codeExpression as CodeFieldReferenceExpression;
                                                            if (codeFieldReferenceExpression != null)
                                                            {
                                                                this.VisitCodeFieldReferenceExpression(codeFieldReferenceExpression);
                                                            }
                                                            else
                                                            {
                                                                CodeIndexerExpression codeIndexerExpression = codeExpression as CodeIndexerExpression;
                                                                if (codeIndexerExpression != null)
                                                                {
                                                                    this.VisitCodeIndexerExpression(codeIndexerExpression);
                                                                }
                                                                else
                                                                {
                                                                    CodeMethodInvokeExpression codeMethodInvokeExpression = codeExpression as CodeMethodInvokeExpression;
                                                                    if (codeMethodInvokeExpression != null)
                                                                    {
                                                                        this.VisitCodeMethodInvokeExpression(codeMethodInvokeExpression);
                                                                    }
                                                                    else
                                                                    {
                                                                        CodeMethodReferenceExpression codeMethodReferenceExpression = codeExpression as CodeMethodReferenceExpression;
                                                                        if (codeMethodReferenceExpression != null)
                                                                        {
                                                                            this.VisitCodeMethodReferenceExpression(codeMethodReferenceExpression);
                                                                        }
                                                                        else
                                                                        {
                                                                            CodeObjectCreateExpression codeObjectCreateExpression = codeExpression as CodeObjectCreateExpression;
                                                                            if (codeObjectCreateExpression != null)
                                                                            {
                                                                                this.VisitCodeObjectCreateExpression(codeObjectCreateExpression);
                                                                            }
                                                                            else
                                                                            {
                                                                                CodeParameterDeclarationExpression codeParameterDeclarationExpression = codeExpression as CodeParameterDeclarationExpression;
                                                                                if (codeParameterDeclarationExpression != null)
                                                                                {
                                                                                    this.VisitCodeParameterDeclarationExpression(codeParameterDeclarationExpression);
                                                                                }
                                                                                else
                                                                                {
                                                                                    CodePrimitiveExpression codePrimitiveExpression = codeExpression as CodePrimitiveExpression;
                                                                                    if (codePrimitiveExpression != null)
                                                                                    {
                                                                                        this.VisitCodePrimitiveExpression(codePrimitiveExpression);
                                                                                    }
                                                                                    else
                                                                                    {
                                                                                        CodePropertyReferenceExpression codePropertyReferenceExpression = codeExpression as CodePropertyReferenceExpression;
                                                                                        if (codePropertyReferenceExpression != null)
                                                                                        {
                                                                                            this.VisitCodePropertyReferenceExpression(codePropertyReferenceExpression);
                                                                                        }
                                                                                        else
                                                                                        {
                                                                                            CodePropertySetValueReferenceExpression codePropertySetValueReferenceExpression = codeExpression as CodePropertySetValueReferenceExpression;
                                                                                            if (codePropertySetValueReferenceExpression != null)
                                                                                            {
                                                                                                this.VisitCodePropertySetValueReferenceExpression(codePropertySetValueReferenceExpression);
                                                                                            }
                                                                                            else
                                                                                            {
                                                                                                CodeSnippetExpression codeSnippetExpression = codeExpression as CodeSnippetExpression;
                                                                                                if (codeSnippetExpression != null)
                                                                                                {
                                                                                                    this.VisitCodeSnippetExpression(codeSnippetExpression);
                                                                                                }
                                                                                                else
                                                                                                {
                                                                                                    CodeThisReferenceExpression codeThisReferenceExpression = codeExpression as CodeThisReferenceExpression;
                                                                                                    if (codeThisReferenceExpression != null)
                                                                                                    {
                                                                                                        this.VisitCodeThisReferenceExpression(codeThisReferenceExpression);
                                                                                                    }
                                                                                                    else
                                                                                                    {
                                                                                                        CodeTypeOfExpression codeTypeOfExpression = codeExpression as CodeTypeOfExpression;
                                                                                                        if (codeTypeOfExpression != null)
                                                                                                        {
                                                                                                            this.VisitCodeTypeOfExpression(codeTypeOfExpression);
                                                                                                        }
                                                                                                        else
                                                                                                        {
                                                                                                            CodeTypeReferenceExpression codeTypeReferenceExpression = codeExpression as CodeTypeReferenceExpression;
                                                                                                            if (codeTypeReferenceExpression != null)
                                                                                                            {
                                                                                                                this.VisitCodeTypeReferenceExpression(codeTypeReferenceExpression);
                                                                                                            }
                                                                                                            else
                                                                                                            {
                                                                                                                CodeVariableReferenceExpression codeVariableReferenceExpression = codeExpression as CodeVariableReferenceExpression;
                                                                                                                if (codeVariableReferenceExpression != null)
                                                                                                                {
                                                                                                                    this.VisitCodeVariableReferenceExpression(codeVariableReferenceExpression);
                                                                                                                }
                                                                                                            }
                                                                                                        }
                                                                                                    }
                                                                                                }
                                                                                            }
                                                                                        }
                                                                                    }
                                                                                }
                                                                            }
                                                                        }
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }

        protected virtual void VisitCodeExpressionCollection(CodeExpressionCollection codeExpressionCollection)
        {
            foreach (CodeExpression expression in codeExpressionCollection.Cast<CodeExpression>())
            {
                this.VisitCodeExpression(expression);
            }
        }

        protected virtual void VisitCodeExpressionStatement(CodeExpressionStatement codeExpressionStatement)
        {
            if (codeExpressionStatement != null)
            {
                this.VisitCodeExpression(codeExpressionStatement.Expression);
                this.VisitCodeLinePragma(codeExpressionStatement.LinePragma);
                this.VisitCodeDirectiveCollection(codeExpressionStatement.StartDirectives);
                this.VisitCodeDirectiveCollection(codeExpressionStatement.EndDirectives);
            }
        }

        protected virtual void VisitCodeFieldReferenceExpression(CodeFieldReferenceExpression codeFieldReferenceExpression)
        {
            if (codeFieldReferenceExpression != null)
            {
                this.VisitCodeExpression(codeFieldReferenceExpression.TargetObject);
            }
        }

        protected virtual void VisitCodeGotoStatement(CodeGotoStatement codeGotoStatement)
        {
            if (codeGotoStatement != null)
            {
                this.VisitCodeLinePragma(codeGotoStatement.LinePragma);
                this.VisitCodeDirectiveCollection(codeGotoStatement.StartDirectives);
                this.VisitCodeDirectiveCollection(codeGotoStatement.EndDirectives);
            }
        }

        protected virtual void VisitCodeIndexerExpression(CodeIndexerExpression codeIndexerExpression)
        {
            if (codeIndexerExpression != null)
            {
                this.VisitCodeExpression(codeIndexerExpression.TargetObject);
                this.VisitCodeExpressionCollection(codeIndexerExpression.Indices);
            }
        }

        protected virtual void VisitCodeIterationStatement(CodeIterationStatement codeIterationStatement)
        {
            if (codeIterationStatement != null)
            {
                this.VisitCodeStatement(codeIterationStatement.InitStatement);
                this.VisitCodeExpression(codeIterationStatement.TestExpression);
                this.VisitCodeStatement(codeIterationStatement.IncrementStatement);
                this.VisitCodeStatementCollection(codeIterationStatement.Statements);
                this.VisitCodeLinePragma(codeIterationStatement.LinePragma);
                this.VisitCodeDirectiveCollection(codeIterationStatement.StartDirectives);
                this.VisitCodeDirectiveCollection(codeIterationStatement.EndDirectives);
            }
        }

        protected virtual void VisitCodeLabeledStatement(CodeLabeledStatement codeLabeledStatement)
        {
            if (codeLabeledStatement != null)
            {
                this.VisitCodeStatement(codeLabeledStatement.Statement);
                this.VisitCodeLinePragma(codeLabeledStatement.LinePragma);
                this.VisitCodeDirectiveCollection(codeLabeledStatement.StartDirectives);
                this.VisitCodeDirectiveCollection(codeLabeledStatement.EndDirectives);
            }
        }

        protected virtual void VisitCodeLinePragma(CodeLinePragma codeLinePragma)
        {
        }

        protected virtual void VisitCodeMemberEvent(CodeMemberEvent codeMemberEvent)
        {
            if (codeMemberEvent != null)
            {
                this.VisitCodeTypeReference(codeMemberEvent.Type);
                this.VisitCodeTypeReference(codeMemberEvent.PrivateImplementationType);
                this.VisitCodeTypeReferenceCollection(codeMemberEvent.ImplementationTypes);
                this.VisitCodeAttributeDeclarationCollection(codeMemberEvent.CustomAttributes);
                this.VisitCodeLinePragma(codeMemberEvent.LinePragma);
                this.VisitCodeCommentStatementCollection(codeMemberEvent.Comments);
                this.VisitCodeDirectiveCollection(codeMemberEvent.StartDirectives);
                this.VisitCodeDirectiveCollection(codeMemberEvent.EndDirectives);
            }
        }

        protected virtual void VisitCodeMemberField(CodeMemberField codeMemberField)
        {
            if (codeMemberField != null)
            {
                this.VisitCodeTypeReference(codeMemberField.Type);
                this.VisitCodeExpression(codeMemberField.InitExpression);
                this.VisitCodeAttributeDeclarationCollection(codeMemberField.CustomAttributes);
                this.VisitCodeLinePragma(codeMemberField.LinePragma);
                this.VisitCodeCommentStatementCollection(codeMemberField.Comments);
                this.VisitCodeDirectiveCollection(codeMemberField.StartDirectives);
                this.VisitCodeDirectiveCollection(codeMemberField.EndDirectives);
            }
        }

        protected virtual void VisitCodeMemberMethod(CodeMemberMethod codeMemberMethod)
        {
            if (codeMemberMethod != null)
            {
                CodeConstructor codeConstructor = codeMemberMethod as CodeConstructor;
                if (codeConstructor != null)
                {
                    this.VisitCodeConstructor(codeConstructor);
                }
                else
                {
                    CodeEntryPointMethod codeEntryPointMethod = codeMemberMethod as CodeEntryPointMethod;
                    if (codeEntryPointMethod != null)
                    {
                        this.VisitCodeEntryPointMethod(codeEntryPointMethod);
                    }
                    else
                    {
                        CodeTypeConstructor codeTypeConstructor = codeMemberMethod as CodeTypeConstructor;
                        if (codeTypeConstructor != null)
                        {
                            this.VisitCodeTypeConstructor(codeTypeConstructor);
                        }
                    }
                }
                this.VisitCodeTypeReference(codeMemberMethod.ReturnType);
                this.VisitCodeStatementCollection(codeMemberMethod.Statements);
                this.VisitCodeParameterDeclarationExpressionCollection(codeMemberMethod.Parameters);
                this.VisitCodeTypeReference(codeMemberMethod.PrivateImplementationType);
                this.VisitCodeTypeReferenceCollection(codeMemberMethod.ImplementationTypes);
                this.VisitCodeAttributeDeclarationCollection(codeMemberMethod.ReturnTypeCustomAttributes);
                this.VisitCodeTypeParameterCollection(codeMemberMethod.TypeParameters);
                this.VisitCodeAttributeDeclarationCollection(codeMemberMethod.CustomAttributes);
                this.VisitCodeLinePragma(codeMemberMethod.LinePragma);
                this.VisitCodeCommentStatementCollection(codeMemberMethod.Comments);
                this.VisitCodeDirectiveCollection(codeMemberMethod.StartDirectives);
                this.VisitCodeDirectiveCollection(codeMemberMethod.EndDirectives);
            }
        }

        protected virtual void VisitCodeMemberProperty(CodeMemberProperty codeMemberProperty)
        {
            if (codeMemberProperty != null)
            {
                this.VisitCodeTypeReference(codeMemberProperty.PrivateImplementationType);
                this.VisitCodeTypeReferenceCollection(codeMemberProperty.ImplementationTypes);
                this.VisitCodeTypeReference(codeMemberProperty.Type);
                this.VisitCodeStatementCollection(codeMemberProperty.GetStatements);
                this.VisitCodeStatementCollection(codeMemberProperty.SetStatements);
                this.VisitCodeParameterDeclarationExpressionCollection(codeMemberProperty.Parameters);
                this.VisitCodeAttributeDeclarationCollection(codeMemberProperty.CustomAttributes);
                this.VisitCodeLinePragma(codeMemberProperty.LinePragma);
                this.VisitCodeCommentStatementCollection(codeMemberProperty.Comments);
                this.VisitCodeDirectiveCollection(codeMemberProperty.StartDirectives);
                this.VisitCodeDirectiveCollection(codeMemberProperty.EndDirectives);
            }
        }

        protected virtual void VisitCodeMethodInvokeExpression(CodeMethodInvokeExpression codeMethodInvokeExpression)
        {
            if (codeMethodInvokeExpression != null)
            {
                this.VisitCodeMethodReferenceExpression(codeMethodInvokeExpression.Method);
                this.VisitCodeExpressionCollection(codeMethodInvokeExpression.Parameters);
            }
        }

        protected virtual void VisitCodeMethodReferenceExpression(CodeMethodReferenceExpression codeMethodReferenceExpression)
        {
            if (codeMethodReferenceExpression != null)
            {
                this.VisitCodeExpression(codeMethodReferenceExpression.TargetObject);
                this.VisitCodeTypeReferenceCollection(codeMethodReferenceExpression.TypeArguments);
            }
        }

        protected virtual void VisitCodeMethodReturnStatement(CodeMethodReturnStatement codeMethodReturnStatement)
        {
            if (codeMethodReturnStatement != null)
            {
                this.VisitCodeExpression(codeMethodReturnStatement.Expression);
                this.VisitCodeLinePragma(codeMethodReturnStatement.LinePragma);
                this.VisitCodeDirectiveCollection(codeMethodReturnStatement.StartDirectives);
                this.VisitCodeDirectiveCollection(codeMethodReturnStatement.EndDirectives);
            }
        }

        protected virtual void VisitCodeNamespace(CodeNamespace codeNamespace)
        {
            if (codeNamespace != null)
            {
                this.VisitCodeTypeDeclarationCollection(codeNamespace.Types);
                this.VisitCodeNamespaceImportCollection(codeNamespace.Imports);
                this.VisitCodeCommentStatementCollection(codeNamespace.Comments);
            }
        }

        protected virtual void VisitCodeNamespaceCollection(CodeNamespaceCollection codeNamespaceCollection)
        {
            foreach (CodeNamespace namespace2 in codeNamespaceCollection.Cast<CodeNamespace>())
            {
                this.VisitCodeNamespace(namespace2);
            }
        }

        protected virtual void VisitCodeNamespaceImport(CodeNamespaceImport codeNamespaceImport)
        {
            if (codeNamespaceImport != null)
            {
                this.VisitCodeLinePragma(codeNamespaceImport.LinePragma);
            }
        }

        protected virtual void VisitCodeNamespaceImportCollection(CodeNamespaceImportCollection codeNamespaceImportCollection)
        {
            foreach (CodeNamespaceImport import in codeNamespaceImportCollection.Cast<CodeNamespaceImport>())
            {
                this.VisitCodeNamespaceImport(import);
            }
        }

        protected virtual void VisitCodeObjectCreateExpression(CodeObjectCreateExpression codeObjectCreateExpression)
        {
            if (codeObjectCreateExpression != null)
            {
                this.VisitCodeTypeReference(codeObjectCreateExpression.CreateType);
                this.VisitCodeExpressionCollection(codeObjectCreateExpression.Parameters);
            }
        }

        protected virtual void VisitCodeParameterDeclarationExpression(CodeParameterDeclarationExpression codeParameterDeclarationExpression)
        {
            if (codeParameterDeclarationExpression != null)
            {
                this.VisitCodeAttributeDeclarationCollection(codeParameterDeclarationExpression.CustomAttributes);
                this.VisitCodeTypeReference(codeParameterDeclarationExpression.Type);
            }
        }

        protected virtual void VisitCodeParameterDeclarationExpressionCollection(CodeParameterDeclarationExpressionCollection codeParameterDeclarationExpressionCollection)
        {
            foreach (CodeParameterDeclarationExpression expression in codeParameterDeclarationExpressionCollection.Cast<CodeParameterDeclarationExpression>())
            {
                this.VisitCodeParameterDeclarationExpression(expression);
            }
        }

        protected virtual void VisitCodePrimitiveExpression(CodePrimitiveExpression codePrimitiveExpression)
        {
        }

        protected virtual void VisitCodePropertyReferenceExpression(CodePropertyReferenceExpression codePropertyReferenceExpression)
        {
            if (codePropertyReferenceExpression != null)
            {
                this.VisitCodeExpression(codePropertyReferenceExpression.TargetObject);
            }
        }

        protected virtual void VisitCodePropertySetValueReferenceExpression(CodePropertySetValueReferenceExpression codePropertySetValueReferenceExpression)
        {
        }

        protected virtual void VisitCodeRegionDirective(CodeRegionDirective codeRegionDirective)
        {
        }

        protected virtual void VisitCodeRemoveEventStatement(CodeRemoveEventStatement codeRemoveEventStatement)
        {
            if (codeRemoveEventStatement != null)
            {
                this.VisitCodeEventReferenceExpression(codeRemoveEventStatement.Event);
                this.VisitCodeExpression(codeRemoveEventStatement.Listener);
                this.VisitCodeLinePragma(codeRemoveEventStatement.LinePragma);
                this.VisitCodeDirectiveCollection(codeRemoveEventStatement.StartDirectives);
                this.VisitCodeDirectiveCollection(codeRemoveEventStatement.EndDirectives);
            }
        }

        protected virtual void VisitCodeSnippetCompileUnit(CodeSnippetCompileUnit codeSnippetCompileUnit)
        {
            if (codeSnippetCompileUnit != null)
            {
                this.VisitCodeLinePragma(codeSnippetCompileUnit.LinePragma);
                this.VisitCodeNamespaceCollection(codeSnippetCompileUnit.Namespaces);
                this.VisitCodeAttributeDeclarationCollection(codeSnippetCompileUnit.AssemblyCustomAttributes);
                this.VisitCodeDirectiveCollection(codeSnippetCompileUnit.StartDirectives);
                this.VisitCodeDirectiveCollection(codeSnippetCompileUnit.EndDirectives);
            }
        }

        protected virtual void VisitCodeSnippetExpression(CodeSnippetExpression codeSnippetExpression)
        {
        }

        protected virtual void VisitCodeSnippetStatement(CodeSnippetStatement codeSnippetStatement)
        {
            if (codeSnippetStatement != null)
            {
                this.VisitCodeLinePragma(codeSnippetStatement.LinePragma);
                this.VisitCodeDirectiveCollection(codeSnippetStatement.StartDirectives);
                this.VisitCodeDirectiveCollection(codeSnippetStatement.EndDirectives);
            }
        }

        protected virtual void VisitCodeSnippetTypeMember(CodeSnippetTypeMember codeSnippetTypeMember)
        {
            if (codeSnippetTypeMember != null)
            {
                this.VisitCodeAttributeDeclarationCollection(codeSnippetTypeMember.CustomAttributes);
                this.VisitCodeLinePragma(codeSnippetTypeMember.LinePragma);
                this.VisitCodeCommentStatementCollection(codeSnippetTypeMember.Comments);
                this.VisitCodeDirectiveCollection(codeSnippetTypeMember.StartDirectives);
                this.VisitCodeDirectiveCollection(codeSnippetTypeMember.EndDirectives);
            }
        }

        protected virtual void VisitCodeStatement(CodeStatement codeStatement)
        {
            if (codeStatement != null)
            {
                CodeAssignStatement codeAssignStatement = codeStatement as CodeAssignStatement;
                if (codeAssignStatement != null)
                {
                    this.VisitCodeAssignStatement(codeAssignStatement);
                }
                else
                {
                    CodeAttachEventStatement codeAttachEventStatement = codeStatement as CodeAttachEventStatement;
                    if (codeAttachEventStatement != null)
                    {
                        this.VisitCodeAttachEventStatement(codeAttachEventStatement);
                    }
                    else
                    {
                        CodeCommentStatement codeCommentStatement = codeStatement as CodeCommentStatement;
                        if (codeCommentStatement != null)
                        {
                            this.VisitCodeCommentStatement(codeCommentStatement);
                        }
                        else
                        {
                            CodeConditionStatement codeConditionStatement = codeStatement as CodeConditionStatement;
                            if (codeConditionStatement != null)
                            {
                                this.VisitCodeConditionStatement(codeConditionStatement);
                            }
                            else
                            {
                                CodeExpressionStatement codeExpressionStatement = codeStatement as CodeExpressionStatement;
                                if (codeExpressionStatement != null)
                                {
                                    this.VisitCodeExpressionStatement(codeExpressionStatement);
                                }
                                else
                                {
                                    CodeGotoStatement codeGotoStatement = codeStatement as CodeGotoStatement;
                                    if (codeGotoStatement != null)
                                    {
                                        this.VisitCodeGotoStatement(codeGotoStatement);
                                    }
                                    else
                                    {
                                        CodeIterationStatement codeIterationStatement = codeStatement as CodeIterationStatement;
                                        if (codeIterationStatement != null)
                                        {
                                            this.VisitCodeIterationStatement(codeIterationStatement);
                                        }
                                        else
                                        {
                                            CodeLabeledStatement codeLabeledStatement = codeStatement as CodeLabeledStatement;
                                            if (codeLabeledStatement != null)
                                            {
                                                this.VisitCodeLabeledStatement(codeLabeledStatement);
                                            }
                                            else
                                            {
                                                CodeMethodReturnStatement codeMethodReturnStatement = codeStatement as CodeMethodReturnStatement;
                                                if (codeMethodReturnStatement != null)
                                                {
                                                    this.VisitCodeMethodReturnStatement(codeMethodReturnStatement);
                                                }
                                                else
                                                {
                                                    CodeRemoveEventStatement codeRemoveEventStatement = codeStatement as CodeRemoveEventStatement;
                                                    if (codeRemoveEventStatement != null)
                                                    {
                                                        this.VisitCodeRemoveEventStatement(codeRemoveEventStatement);
                                                    }
                                                    else
                                                    {
                                                        CodeSnippetStatement codeSnippetStatement = codeStatement as CodeSnippetStatement;
                                                        if (codeSnippetStatement != null)
                                                        {
                                                            this.VisitCodeSnippetStatement(codeSnippetStatement);
                                                        }
                                                        else
                                                        {
                                                            CodeThrowExceptionStatement codeThrowExceptionStatement = codeStatement as CodeThrowExceptionStatement;
                                                            if (codeThrowExceptionStatement != null)
                                                            {
                                                                this.VisitCodeThrowExceptionStatement(codeThrowExceptionStatement);
                                                            }
                                                            else
                                                            {
                                                                CodeTryCatchFinallyStatement codeTryCatchFinallyStatement = codeStatement as CodeTryCatchFinallyStatement;
                                                                if (codeTryCatchFinallyStatement != null)
                                                                {
                                                                    this.VisitCodeTryCatchFinallyStatement(codeTryCatchFinallyStatement);
                                                                }
                                                                else
                                                                {
                                                                    CodeVariableDeclarationStatement codeVariableDeclarationStatement = codeStatement as CodeVariableDeclarationStatement;
                                                                    if (codeVariableDeclarationStatement != null)
                                                                    {
                                                                        this.VisitCodeVariableDeclarationStatement(codeVariableDeclarationStatement);
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
                this.VisitCodeLinePragma(codeStatement.LinePragma);
                this.VisitCodeDirectiveCollection(codeStatement.StartDirectives);
                this.VisitCodeDirectiveCollection(codeStatement.EndDirectives);
            }
        }

        protected virtual void VisitCodeStatementCollection(CodeStatementCollection codeStatementCollection)
        {
            foreach (CodeStatement statement in codeStatementCollection.Cast<CodeStatement>())
            {
                this.VisitCodeStatement(statement);
            }
        }

        protected virtual void VisitCodeThisReferenceExpression(CodeThisReferenceExpression codeThisReferenceExpression)
        {
        }

        protected virtual void VisitCodeThrowExceptionStatement(CodeThrowExceptionStatement codeThrowExceptionStatement)
        {
            if (codeThrowExceptionStatement != null)
            {
                this.VisitCodeExpression(codeThrowExceptionStatement.ToThrow);
                this.VisitCodeLinePragma(codeThrowExceptionStatement.LinePragma);
                this.VisitCodeDirectiveCollection(codeThrowExceptionStatement.StartDirectives);
                this.VisitCodeDirectiveCollection(codeThrowExceptionStatement.EndDirectives);
            }
        }

        protected virtual void VisitCodeTryCatchFinallyStatement(CodeTryCatchFinallyStatement codeTryCatchFinallyStatement)
        {
            if (codeTryCatchFinallyStatement != null)
            {
                this.VisitCodeStatementCollection(codeTryCatchFinallyStatement.TryStatements);
                this.VisitCodeCatchClauseCollection(codeTryCatchFinallyStatement.CatchClauses);
                this.VisitCodeStatementCollection(codeTryCatchFinallyStatement.FinallyStatements);
                this.VisitCodeLinePragma(codeTryCatchFinallyStatement.LinePragma);
                this.VisitCodeDirectiveCollection(codeTryCatchFinallyStatement.StartDirectives);
                this.VisitCodeDirectiveCollection(codeTryCatchFinallyStatement.EndDirectives);
            }
        }

        protected virtual void VisitCodeTypeConstructor(CodeTypeConstructor codeTypeConstructor)
        {
            if (codeTypeConstructor != null)
            {
                this.VisitCodeTypeReference(codeTypeConstructor.ReturnType);
                this.VisitCodeStatementCollection(codeTypeConstructor.Statements);
                this.VisitCodeParameterDeclarationExpressionCollection(codeTypeConstructor.Parameters);
                this.VisitCodeTypeReference(codeTypeConstructor.PrivateImplementationType);
                this.VisitCodeTypeReferenceCollection(codeTypeConstructor.ImplementationTypes);
                this.VisitCodeAttributeDeclarationCollection(codeTypeConstructor.ReturnTypeCustomAttributes);
                this.VisitCodeTypeParameterCollection(codeTypeConstructor.TypeParameters);
                this.VisitCodeAttributeDeclarationCollection(codeTypeConstructor.CustomAttributes);
                this.VisitCodeLinePragma(codeTypeConstructor.LinePragma);
                this.VisitCodeCommentStatementCollection(codeTypeConstructor.Comments);
                this.VisitCodeDirectiveCollection(codeTypeConstructor.StartDirectives);
                this.VisitCodeDirectiveCollection(codeTypeConstructor.EndDirectives);
            }
        }

        protected virtual void VisitCodeTypeDeclaration(CodeTypeDeclaration codeTypeDeclaration)
        {
            if (codeTypeDeclaration != null)
            {
                CodeTypeDelegate codeTypeDelegate = codeTypeDeclaration as CodeTypeDelegate;
                if (codeTypeDelegate != null)
                {
                    this.VisitCodeTypeDelegate(codeTypeDelegate);
                }
                this.VisitCodeTypeReferenceCollection(codeTypeDeclaration.BaseTypes);
                this.VisitCodeTypeMemberCollection(codeTypeDeclaration.Members);
                this.VisitCodeTypeParameterCollection(codeTypeDeclaration.TypeParameters);
                this.VisitCodeAttributeDeclarationCollection(codeTypeDeclaration.CustomAttributes);
                this.VisitCodeLinePragma(codeTypeDeclaration.LinePragma);
                this.VisitCodeCommentStatementCollection(codeTypeDeclaration.Comments);
                this.VisitCodeDirectiveCollection(codeTypeDeclaration.StartDirectives);
                this.VisitCodeDirectiveCollection(codeTypeDeclaration.EndDirectives);
            }
        }

        protected virtual void VisitCodeTypeDeclarationCollection(CodeTypeDeclarationCollection codeTypeDeclarationCollection)
        {
            foreach (CodeTypeDeclaration declaration in codeTypeDeclarationCollection.Cast<CodeTypeDeclaration>())
            {
                this.VisitCodeTypeDeclaration(declaration);
            }
        }

        protected virtual void VisitCodeTypeDelegate(CodeTypeDelegate codeTypeDelegate)
        {
            if (codeTypeDelegate != null)
            {
                this.VisitCodeTypeReference(codeTypeDelegate.ReturnType);
                this.VisitCodeParameterDeclarationExpressionCollection(codeTypeDelegate.Parameters);
                this.VisitCodeTypeReferenceCollection(codeTypeDelegate.BaseTypes);
                this.VisitCodeTypeMemberCollection(codeTypeDelegate.Members);
                this.VisitCodeTypeParameterCollection(codeTypeDelegate.TypeParameters);
                this.VisitCodeAttributeDeclarationCollection(codeTypeDelegate.CustomAttributes);
                this.VisitCodeLinePragma(codeTypeDelegate.LinePragma);
                this.VisitCodeCommentStatementCollection(codeTypeDelegate.Comments);
                this.VisitCodeDirectiveCollection(codeTypeDelegate.StartDirectives);
                this.VisitCodeDirectiveCollection(codeTypeDelegate.EndDirectives);
            }
        }

        protected virtual void VisitCodeTypeMember(CodeTypeMember codeTypeMember)
        {
            if (codeTypeMember != null)
            {
                CodeMemberMethod codeMemberMethod = codeTypeMember as CodeMemberMethod;
                if (codeMemberMethod != null)
                {
                    this.VisitCodeMemberMethod(codeMemberMethod);
                }
                else
                {
                    CodeMemberEvent codeMemberEvent = codeTypeMember as CodeMemberEvent;
                    if (codeMemberEvent != null)
                    {
                        this.VisitCodeMemberEvent(codeMemberEvent);
                    }
                    else
                    {
                        CodeMemberField codeMemberField = codeTypeMember as CodeMemberField;
                        if (codeMemberField != null)
                        {
                            this.VisitCodeMemberField(codeMemberField);
                        }
                        else
                        {
                            CodeMemberProperty codeMemberProperty = codeTypeMember as CodeMemberProperty;
                            if (codeMemberProperty != null)
                            {
                                this.VisitCodeMemberProperty(codeMemberProperty);
                            }
                            else
                            {
                                CodeSnippetTypeMember codeSnippetTypeMember = codeTypeMember as CodeSnippetTypeMember;
                                if (codeSnippetTypeMember != null)
                                {
                                    this.VisitCodeSnippetTypeMember(codeSnippetTypeMember);
                                }
                                else
                                {
                                    CodeTypeDeclaration codeTypeDeclaration = codeTypeMember as CodeTypeDeclaration;
                                    if (codeTypeDeclaration != null)
                                    {
                                        this.VisitCodeTypeDeclaration(codeTypeDeclaration);
                                    }
                                }
                            }
                        }
                    }
                }
                this.VisitCodeAttributeDeclarationCollection(codeTypeMember.CustomAttributes);
                this.VisitCodeLinePragma(codeTypeMember.LinePragma);
                this.VisitCodeCommentStatementCollection(codeTypeMember.Comments);
                this.VisitCodeDirectiveCollection(codeTypeMember.StartDirectives);
                this.VisitCodeDirectiveCollection(codeTypeMember.EndDirectives);
            }
        }

        protected virtual void VisitCodeTypeMemberCollection(CodeTypeMemberCollection codeTypeMemberCollection)
        {
            foreach (CodeTypeMember member in codeTypeMemberCollection.Cast<CodeTypeMember>())
            {
                this.VisitCodeTypeMember(member);
            }
        }

        protected virtual void VisitCodeTypeOfExpression(CodeTypeOfExpression codeTypeOfExpression)
        {
            if (codeTypeOfExpression != null)
            {
                this.VisitCodeTypeReference(codeTypeOfExpression.Type);
            }
        }

        protected virtual void VisitCodeTypeParameter(CodeTypeParameter codeTypeParameter)
        {
            if (codeTypeParameter != null)
            {
                this.VisitCodeTypeReferenceCollection(codeTypeParameter.Constraints);
                this.VisitCodeAttributeDeclarationCollection(codeTypeParameter.CustomAttributes);
            }
        }

        protected virtual void VisitCodeTypeParameterCollection(CodeTypeParameterCollection codeTypeParameterCollection)
        {
            foreach (CodeTypeParameter parameter in codeTypeParameterCollection.Cast<CodeTypeParameter>())
            {
                this.VisitCodeTypeParameter(parameter);
            }
        }

        protected virtual void VisitCodeTypeReference(CodeTypeReference codeTypeReference)
        {
            if (codeTypeReference != null)
            {
                this.VisitCodeTypeReference(codeTypeReference.ArrayElementType);
                this.VisitCodeTypeReferenceCollection(codeTypeReference.TypeArguments);
            }
        }

        protected virtual void VisitCodeTypeReferenceCollection(CodeTypeReferenceCollection codeTypeReferenceCollection)
        {
            foreach (CodeTypeReference reference in codeTypeReferenceCollection.Cast<CodeTypeReference>())
            {
                this.VisitCodeTypeReference(reference);
            }
        }

        protected virtual void VisitCodeTypeReferenceExpression(CodeTypeReferenceExpression codeTypeReferenceExpression)
        {
            if (codeTypeReferenceExpression != null)
            {
                this.VisitCodeTypeReference(codeTypeReferenceExpression.Type);
            }
        }

        protected virtual void VisitCodeVariableDeclarationStatement(CodeVariableDeclarationStatement codeVariableDeclarationStatement)
        {
            if (codeVariableDeclarationStatement != null)
            {
                this.VisitCodeExpression(codeVariableDeclarationStatement.InitExpression);
                this.VisitCodeTypeReference(codeVariableDeclarationStatement.Type);
                this.VisitCodeLinePragma(codeVariableDeclarationStatement.LinePragma);
                this.VisitCodeDirectiveCollection(codeVariableDeclarationStatement.StartDirectives);
                this.VisitCodeDirectiveCollection(codeVariableDeclarationStatement.EndDirectives);
            }
        }

        protected virtual void VisitCodeVariableReferenceExpression(CodeVariableReferenceExpression codeVariableReferenceExpression)
        {
        }
    }
}

